﻿using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using JustinAngel.UnitedNationsNews.AppCore;
using JustinAngel.UnitedNationsNews.Framework;
using Microsoft.Phone.Controls;
using JustinAngel.Neurons.Framework.Helpers;

namespace JustinAngel.UnitedNationsNews.Pages.WebBrowser
{
    public partial class WebBrowserPage : BasePage
    {

        public WebBrowserPage()
        {
            InitializeComponent();
            webBrowser.Navigated += new EventHandler<System.Windows.Navigation.NavigationEventArgs>(webBrowser_Navigated);

        }

        void webBrowser_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            DataContext.As<WebBrowserViewModel>().CurrentSource = webBrowser.Source;
        }
    }
}